﻿Public Class CreateEpixeirisiUserControl

    Private Sub EpixeirisiBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Me.Validate()
        Me.EpixeirisiBindingSource.EndEdit()
        Me.TableAdapterManager.UpdateAll(Me.Hard_oneDataSet)

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If (Theorimeni_apothimiCheckBox.Checked) Then
            Me.EpixeirisiTableAdapter.InsertQuery(IdEpixeirisiTextBox.Text, AfmTextBox.Text, Idioktitis_onomaTextBox.Text, Idioktitis_epithetoTextBox.Text, EponimiaTextBox.Text, XoraTextBox.Text, NomosTextBox.Text, PoliTextBox.Text, PerioxiTextBox.Text, DiefthinsiTextBox.Text, Convert.ToInt32(Post_codeTextBox.Text), TilefonoTextBox.Text, FaxTextBox.Text, EmailTextBox.Text, Kathestos_fpaTextBox.Text, CheckState.Checked, Convert.ToInt32(DoyTextBox.Text))
        Else
            Me.EpixeirisiTableAdapter.InsertQuery(IdEpixeirisiTextBox.Text, AfmTextBox.Text, Idioktitis_onomaTextBox.Text, Idioktitis_epithetoTextBox.Text, EponimiaTextBox.Text, XoraTextBox.Text, NomosTextBox.Text, PoliTextBox.Text, PerioxiTextBox.Text, DiefthinsiTextBox.Text, Convert.ToInt32(Post_codeTextBox.Text), TilefonoTextBox.Text, FaxTextBox.Text, EmailTextBox.Text, Kathestos_fpaTextBox.Text, CheckState.Unchecked, Convert.ToInt32(DoyTextBox.Text))
        End If
    End Sub
End Class
